#include "widget.h"
#include "ui_widget.h"

#include <QToolBox>
#include <QVBoxLayout>

Widget::Widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Widget)
{
    ui->setupUi(this);

    QToolBox* tool = new QToolBox(this);
    tool->resize(150, 200);
    tool->move(300, 30);
    tool->setFrameShape(QFrame::Box);

    QWidget* w1 = new QWidget;
    QVBoxLayout* v1 = new QVBoxLayout(w1);
    v1->addWidget(new QPushButton("小明"));
    v1->addWidget(new QPushButton("小章"));

    tool->addItem(w1, "我的好友");

    QWidget* w2 = new QWidget;
    tool->addItem(w2, "我的儿子们");

}

Widget::~Widget()
{
    delete ui;
}
